using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Printing;

namespace MasterLab.Impresiones
{
    public partial class frmInterpretacion : Form
    {
        private PrintDocument printDocument1 = new PrintDocument();

        public frmInterpretacion(string str)
        {
            InitializeComponent();
            this.richTextBox1.Text = str;
            printDocument1.PrintPage += new PrintPageEventHandler(printDocument1_PrintPage);

        }

        private void frmInterpretacion_Load(object sender, EventArgs e)
        {

        }

        private void btnImprimir_Click(object sender, EventArgs e)
        {
            printDocument1.Print();
        }
        private void printDocument1_PrintPage(System.Object sender,

               System.Drawing.Printing.PrintPageEventArgs e)
        {
            Font fuente = new Font(FontFamily.GenericSerif, 12.0f, FontStyle.Regular);
            e.Graphics.DrawString(richTextBox1.Text, fuente, Brushes.Black, 0, 0);

            return;
        }

        private void richTextBox1_TextChanged(object sender, EventArgs e)
        {
            //ejemplo
        }
    }
}
